.class public Lcom/estrongs/android/pop/app/leftnavigation/d0;
.super Ljava/lang/Object;
.source "LeftNaviManager.java"


# static fields
.field private static e:Lcom/estrongs/android/pop/app/leftnavigation/d0;


# instance fields
.field private a:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Les/gn;",
            ">;"
        }
    .end annotation
.end field

.field private b:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field

.field private c:Lorg/json/JSONObject;

.field private d:Lcom/estrongs/android/pop/app/leftnavigation/e0;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .line 1
    new-instance v0, Lcom/estrongs/android/pop/app/leftnavigation/d0;

    invoke-direct {v0}, Lcom/estrongs/android/pop/app/leftnavigation/d0;-><init>()V

    sput-object v0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->e:Lcom/estrongs/android/pop/app/leftnavigation/d0;

    return-void
.end method

.method private constructor <init>()V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->c:Lorg/json/JSONObject;

    return-void
.end method

.method private a(Les/gn;)V
    .locals 2

    .line 49
    iget-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->b:Ljava/util/Map;

    invoke-virtual {p1}, Les/gn;->e()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    return-void

    .line 50
    :cond_0
    invoke-virtual {p1}, Les/gn;->b()Z

    move-result v0

    if-nez v0, :cond_1

    invoke-virtual {p1}, Les/gn;->k()Z

    move-result v0

    if-eqz v0, :cond_2

    .line 51
    :cond_1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 52
    iget-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->b:Ljava/util/Map;

    invoke-virtual {p1}, Les/gn;->e()Ljava/lang/String;

    move-result-object p1

    iget-object v1, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v0, p1, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    :cond_2
    return-void
.end method

.method public static c()Lcom/estrongs/android/pop/app/leftnavigation/d0;
    .locals 1

    .line 1
    sget-object v0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->e:Lcom/estrongs/android/pop/app/leftnavigation/d0;

    return-object v0
.end method

.method private d()V
    .locals 2

    .line 1
    invoke-static {}, Lcom/estrongs/android/pop/l;->L1()Lcom/estrongs/android/pop/l;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/android/pop/l;->S()Ljava/lang/String;

    move-result-object v0

    .line 2
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_0

    .line 3
    :try_start_0
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1, v0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    iput-object v1, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->c:Lorg/json/JSONObject;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    .line 4
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    .line 5
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->c:Lorg/json/JSONObject;

    :cond_0
    :goto_0
    return-void
.end method


# virtual methods
.method public a()Lorg/json/JSONObject;
    .locals 2

    .line 53
    iget-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->c:Lorg/json/JSONObject;

    const-string v1, "child"

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    return-object v0
.end method

.method public a(Lcom/estrongs/android/pop/app/leftnavigation/e0;)V
    .locals 0

    .line 75
    iput-object p1, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->d:Lcom/estrongs/android/pop/app/leftnavigation/e0;

    return-void
.end method

.method public declared-synchronized a(Z)V
    .locals 2

    monitor-enter p0

    .line 1
    :try_start_0
    invoke-direct {p0}, Lcom/estrongs/android/pop/app/leftnavigation/d0;->d()V

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a:Ljava/util/List;

    if-nez v0, :cond_0

    .line 3
    new-instance v0, Ljava/util/concurrent/CopyOnWriteArrayList;

    invoke-direct {v0}, Ljava/util/concurrent/CopyOnWriteArrayList;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a:Ljava/util/List;

    goto :goto_0

    .line 4
    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 5
    :goto_0
    iget-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->b:Ljava/util/Map;

    if-nez v0, :cond_1

    .line 6
    new-instance v0, Ljava/util/concurrent/ConcurrentHashMap;

    invoke-direct {v0}, Ljava/util/concurrent/ConcurrentHashMap;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->b:Ljava/util/Map;

    goto :goto_1

    .line 7
    :cond_1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->b:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->clear()V

    .line 8
    :goto_1
    sget-boolean v0, Lcom/estrongs/android/pop/view/e;->a:Z

    const/4 v1, 0x1

    if-nez v0, :cond_2

    if-eqz p1, :cond_2

    .line 9
    new-instance v0, Les/tn;

    invoke-direct {v0}, Les/tn;-><init>()V

    .line 10
    invoke-virtual {v0, v1}, Les/gn;->a(Z)V

    .line 11
    invoke-direct {p0, v0}, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a(Les/gn;)V

    .line 12
    :cond_2
    sget-boolean v0, Lcom/estrongs/android/pop/j;->w0:Z

    if-nez v0, :cond_3

    .line 13
    new-instance v0, Les/fn;

    invoke-direct {v0}, Les/fn;-><init>()V

    .line 14
    invoke-virtual {v0, p1}, Les/gn;->a(Z)V

    .line 15
    invoke-direct {p0, v0}, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a(Les/gn;)V

    .line 16
    :cond_3
    new-instance v0, Les/in;

    invoke-direct {v0}, Les/in;-><init>()V

    .line 17
    invoke-virtual {v0, p1}, Les/gn;->a(Z)V

    if-nez p1, :cond_4

    .line 18
    invoke-virtual {v0}, Les/in;->a()V

    .line 19
    :cond_4
    invoke-direct {p0, v0}, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a(Les/gn;)V

    .line 20
    new-instance v0, Les/kn;

    invoke-direct {v0}, Les/kn;-><init>()V

    .line 21
    invoke-virtual {v0, p1}, Les/gn;->a(Z)V

    .line 22
    invoke-virtual {v0}, Les/kn;->a()V

    .line 23
    invoke-direct {p0, v0}, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a(Les/gn;)V

    .line 24
    new-instance v0, Les/jn;

    invoke-direct {v0}, Les/jn;-><init>()V

    .line 25
    invoke-virtual {v0, p1}, Les/gn;->a(Z)V

    .line 26
    invoke-virtual {v0}, Les/jn;->a()V

    .line 27
    invoke-direct {p0, v0}, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a(Les/gn;)V

    .line 28
    new-instance v0, Les/mn;

    invoke-direct {v0}, Les/mn;-><init>()V

    .line 29
    invoke-virtual {v0, p1}, Les/gn;->a(Z)V

    .line 30
    invoke-virtual {v0}, Les/mn;->a()V

    .line 31
    invoke-direct {p0, v0}, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a(Les/gn;)V

    .line 32
    new-instance v0, Les/rn;

    invoke-direct {v0}, Les/rn;-><init>()V

    .line 33
    invoke-virtual {v0, p1}, Les/gn;->a(Z)V

    .line 34
    invoke-virtual {v0}, Les/rn;->a()V

    .line 35
    invoke-direct {p0, v0}, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a(Les/gn;)V

    .line 36
    sget-boolean v0, Lcom/estrongs/android/pop/view/e;->a:Z

    if-nez v0, :cond_5

    const-string v0, "lock_nomedia"

    .line 37
    invoke-static {v0}, Lcom/estrongs/android/pop/app/unlock/i;->a(Ljava/lang/String;)Les/k00;

    move-result-object v0

    .line 38
    invoke-static {v0, v1}, Lcom/estrongs/android/pop/app/unlock/i;->b(Les/k00;Z)Z

    move-result v0

    if-eqz v0, :cond_5

    .line 39
    new-instance v0, Les/nn;

    invoke-direct {v0}, Les/nn;-><init>()V

    .line 40
    invoke-virtual {v0, p1}, Les/gn;->a(Z)V

    .line 41
    invoke-direct {p0, v0}, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a(Les/gn;)V

    .line 42
    :cond_5
    sget-boolean v0, Lcom/estrongs/android/pop/view/e;->a:Z

    if-nez v0, :cond_6

    const-string v0, "lock_SMB2"

    .line 43
    invoke-static {v0}, Lcom/estrongs/android/pop/app/unlock/i;->a(Ljava/lang/String;)Les/k00;

    move-result-object v0

    .line 44
    invoke-static {v0, v1}, Lcom/estrongs/android/pop/app/unlock/i;->b(Les/k00;Z)Z

    move-result v1

    if-eqz v1, :cond_6

    invoke-virtual {v0}, Les/l00;->d()Z

    move-result v0

    if-eqz v0, :cond_6

    .line 45
    new-instance v0, Les/pn;

    invoke-direct {v0}, Les/pn;-><init>()V

    .line 46
    invoke-virtual {v0, p1}, Les/gn;->a(Z)V

    .line 47
    invoke-direct {p0, v0}, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a(Les/gn;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 48
    :cond_6
    monitor-exit p0

    return-void

    :catchall_0
    move-exception p1

    monitor-exit p0

    throw p1
.end method

.method public a(Ljava/util/List;)Z
    .locals 11
    .param p1    # Ljava/util/List;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Les/gn;",
            ">;)Z"
        }
    .end annotation

    .line 54
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    .line 55
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V

    .line 56
    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2}, Lorg/json/JSONObject;-><init>()V

    const/4 v3, 0x0

    .line 57
    :try_start_0
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :cond_0
    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    const/4 v5, 0x1

    if-eqz v4, :cond_5

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Les/gn;

    .line 58
    invoke-virtual {v4}, Les/gn;->e()Ljava/lang/String;

    move-result-object v6

    .line 59
    invoke-virtual {v4}, Les/gn;->i()I

    move-result v7

    if-ne v7, v5, :cond_4

    const-string v7, "Favorite"

    .line 60
    invoke-virtual {v7, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-nez v7, :cond_4

    .line 61
    invoke-virtual {v4}, Les/gn;->d()Ljava/util/List;

    move-result-object v7

    .line 62
    invoke-interface {v7}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v7

    const/4 v8, 0x0

    :cond_1
    :goto_1
    invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z

    move-result v9

    if-eqz v9, :cond_2

    invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Les/pm;

    .line 63
    invoke-virtual {v9}, Les/pm;->g()Z

    move-result v10

    if-nez v10, :cond_1

    add-int/lit8 v8, v8, 0x1

    .line 64
    invoke-virtual {v9}, Les/pm;->d()Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v2, v9, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject;

    goto :goto_1

    :cond_2
    if-gtz v8, :cond_3

    .line 65
    invoke-virtual {v4}, Les/gn;->l()Z

    move-result v4

    if-nez v4, :cond_0

    .line 66
    :cond_3
    invoke-virtual {v1, v6, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject;

    goto :goto_0

    .line 67
    :cond_4
    invoke-virtual {v4}, Les/gn;->l()Z

    move-result v4

    if-nez v4, :cond_0

    .line 68
    invoke-virtual {v1, v6, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject;

    goto :goto_0

    :cond_5
    const-string p1, "group"

    .line 69
    invoke-virtual {v0, p1, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string p1, "child"

    .line 70
    invoke-virtual {v0, p1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 71
    iput-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->c:Lorg/json/JSONObject;

    .line 72
    invoke-static {}, Lcom/estrongs/android/pop/l;->L1()Lcom/estrongs/android/pop/l;

    move-result-object p1

    iget-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->c:Lorg/json/JSONObject;

    invoke-virtual {p1, v0}, Lcom/estrongs/android/pop/l;->a(Lorg/json/JSONObject;)V

    .line 73
    iget-object p1, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->d:Lcom/estrongs/android/pop/app/leftnavigation/e0;

    if-eqz p1, :cond_6

    .line 74
    invoke-interface {p1}, Lcom/estrongs/android/pop/app/leftnavigation/e0;->a()V

    :cond_6
    return v5

    :catch_0
    return v3
.end method

.method public declared-synchronized b(Z)Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(Z)",
            "Ljava/util/List<",
            "Les/gn;",
            ">;"
        }
    .end annotation

    monitor-enter p0

    .line 1
    :try_start_0
    iget-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a:Ljava/util/List;

    if-nez v0, :cond_0

    .line 2
    invoke-virtual {p0, p1}, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a(Z)V

    .line 3
    :cond_0
    new-instance p1, Ljava/util/concurrent/CopyOnWriteArrayList;

    iget-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a:Ljava/util/List;

    invoke-direct {p1, v0}, Ljava/util/concurrent/CopyOnWriteArrayList;-><init>(Ljava/util/Collection;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit p0

    return-object p1

    :catchall_0
    move-exception p1

    monitor-exit p0

    throw p1
.end method

.method public b()Lorg/json/JSONObject;
    .locals 2

    .line 4
    iget-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->c:Lorg/json/JSONObject;

    const-string v1, "group"

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    return-object v0
.end method

.method public b(Lcom/estrongs/android/pop/app/leftnavigation/e0;)V
    .locals 0

    const/4 p1, 0x0

    .line 5
    iput-object p1, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->d:Lcom/estrongs/android/pop/app/leftnavigation/e0;

    return-void
.end method

.method public declared-synchronized c(Z)Ljava/util/Map;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(Z)",
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation

    monitor-enter p0

    .line 2
    :try_start_0
    iget-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->b:Ljava/util/Map;

    if-nez v0, :cond_0

    .line 3
    invoke-virtual {p0, p1}, Lcom/estrongs/android/pop/app/leftnavigation/d0;->a(Z)V

    .line 4
    :cond_0
    new-instance p1, Ljava/util/concurrent/ConcurrentHashMap;

    iget-object v0, p0, Lcom/estrongs/android/pop/app/leftnavigation/d0;->b:Ljava/util/Map;

    invoke-direct {p1, v0}, Ljava/util/concurrent/ConcurrentHashMap;-><init>(Ljava/util/Map;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit p0

    return-object p1

    :catchall_0
    move-exception p1

    monitor-exit p0

    throw p1
.end method
